package mk.jug.academy.testing.factory;

import java.util.UUID;

import mk.jug.academy.model.Student;
import mk.jug.academy.model.status.StudentStatus;


/**
 * Factory for creating instances for testing purposes.
 * 
 * @author Ice.Penov
 */
public final class StudentTestFactory {
	
	/** No instantiation. Static usage only. */
	private StudentTestFactory() {;}
	
	/** Creates a random {@link Student} instance, for testing purposes */	
	public static Student createStudent() {
		Student student = new Student();
		student.setBio("bio" + UUID.randomUUID());
		student.setEmail(UUID.randomUUID() + "@example.com");
		student.setPassword(UUID.randomUUID().toString());
		student.setFirstName("firstName" + UUID.randomUUID());
		student.setLastName("lastName" + UUID.randomUUID());
		student.setReasonForSigningUp("reasonForSigningUp" + UUID.randomUUID());
		student.setStatus(StudentStatus.SIGNED_UP);
		return student;
	}
	
	/** Creates a random {@link Student} instance, for testing purposes */	
	public static Student createWithMissingFirstName() {
		Student student = createStudent();
		student.setFirstName(null);
		return student;
	}
	
	/** Creates a random {@link Student} instance, for testing purposes */	
	public static Student createWithMissingLastName() {
		Student student = createStudent();
		student.setLastName(null);
		return student;
	}
	
}